﻿{{include 'admin/public/header.html'}}


<div class="main-container" id="main-container">
	<div class="main-container-inner">

		{{include 'admin/public/nav.html'}}


		<div class="main-content">


			<div class="page-content">

				<div class="page-header">
					<h1>
						直播流统计

						<div class="sub_header">
						
							<a href="/admin/log/streamLog?online=1">在线流</a>
		
							<a href="/admin/log/streamLog?online=0">离线流</a>
						</div>
					</h1>
					
					
					
				</div>

				
				<!--表格-->

				<div class="table-responsive">
					{{if list.length>0}}
						<table id="sample-table-1" class="table table-striped table-bordered table-hover center">
							<thead>
								<tr>


									{{if online==1}}
										<th class="center">流名称</th>
										<th class="center">开始推流时间</th>							
										<th class="center">状态</th>

									{{else}}
										<th class="center">流名称</th>
										<th class="center">结束推流时间</th>	
										<th class="center">推流时长</th>							
										<th class="center">状态</th>	
									{{/if}}
									
															
								</tr>
							</thead>
							

									<tbody>

										{{each list}}

											{{if online==1}}

												<tr class="">
													<td>
														{{$value.stream_name}}
													</td>
													<td>
														{{$value.start_time | dateFormat}}
													</td>

												
													<td>
														在线
													</td>
																						
													
												</tr>

											{{else}}

												<tr class="">
													<td>
														{{$value.stream_name}}
													</td>
													<td>
														{{$value.end_time | dateFormat}}
													</td>

													<td>
														{{$value.total_time/1000}} 秒
													</td>
												
													<td>
														离线
													</td>
												</tr>


											{{/if}}
										{{/each}}

									</tbody>
								</table>

							<div id="page" class="pagination"></div>
					{{else}}
						<p style="text-align:center;">无数据...</p>
					{{/if}}
					
				</div>

			</div>
		</div><!-- /.main-content -->

	</div><!-- /.main-container-inner -->

</div><!-- /.main-container -->

<script src="{{__ROOT__}}/admin/js/jquery-2.0.3.min.js"></script>
<script src="{{__ROOT__}}/admin/js/jqPaginator.js"></script>

<script>

	$(function(){

		$('#page').jqPaginator({
			totalPages: {{totalPages}},
			visiblePages: 8,
			currentPage: {{page}},
			onPageChange: function (num, type) {
				if(type=='change'){
					location.href="/admin/manage?page="+num;
				}
			}
		})
	})

</script>


</body>

</html>